package com.tcwlkj.uuService.utils;

import android.content.Context;

import com.tcwlkj.uuService.MyApp;
import com.tcwlkj.uuService.R;

/**
 * Created by Administrator on 2017/10/13 0013.
 */

public class WaitDialogUtil {
    private WaitDialog waitDialog;
    private static WaitDialogUtil waitDialogUtil = null;

    private WaitDialogUtil() {
    }

    public static WaitDialogUtil getInstance() {
        synchronized (WaitDialogUtil.class) {
            if (waitDialogUtil == null) {
                waitDialogUtil = new WaitDialogUtil();
            }
        }
        return waitDialogUtil;
    }
    public void showDialog(Context context) {
        waitDialog = new WaitDialog(context, R.style.Translucent_NoTitle);
        waitDialog.setCancelable(true);
        waitDialog.show();
    }
    public void dismissDialog() {
        if (waitDialog != null && waitDialog.isShowing()) {
            waitDialog.dismiss();
        }
    }
}
